<?php

function active_tab($module, $actions = array()) {
    if ($module == sfContext::getInstance()->getModuleName()) {
        if (count($actions) == 0)
            return true;

        foreach ($actions as $action) {
            if ($action == sfContext::getInstance()->getActionName())
                return true;
        }
    }
    return false;
}

